using System;
using System.Collections.Generic;
using System.Text;

namespace CodeFx
{
    public static class ConvertHelper
    {
        public static byte BoolToByte(bool myConvert)
        {
            if (myConvert)
                return 1;
            else
                return 0;
        }

        public static bool StringToBool(string myConvert)
        {
            if (!string.IsNullOrEmpty(myConvert) && myConvert.Equals("1"))
                return true;
            else
                return false;
        }

        public static bool IntToBool(int myConvert)
        {
            if (myConvert.Equals(1))
                return true;
            else
                return false;
        }
        public static bool uIntToBool(uint myConvert)
        {
            if (myConvert.Equals(1))
                return true;
            else
                return false;
        }
        public static bool uShortToBool(ushort myConvert)
        {
            if (myConvert.Equals(1))
                return true;
            else
                return false;
        }
        public static bool sByteToBool(sbyte myConvert)
        {
            if (myConvert.Equals(1))
                return true;
            else
                return false;
        }
        public static bool ByteToBool(byte myConvert)
        {
            if (myConvert.Equals(1))
                return true;
            else
                return false;
        }

        public static uint BoolTouInt(bool myConvert)
        {
            if (myConvert)
                return 1;
            else
                return 0;
        }
        public static ushort BoolTouShort(bool myConvert)
        {
            if (myConvert)
                return 1;
            else
                return 0;
        }

        public static sbyte BoolTosByte(bool myConvert)
        {
            if (myConvert)
                return 1;
            else
                return 0;
        }
    }
}
